<div id="header">
    <h1><a id="headerTitle" href="home.php">Palo Alto Bicycle Club</a></h1>

    <div id="msgHead">
    	
    <?php
        //adds the latest announcement on the home page.
        $doc = new DOMDocument;
        $doc->load("announcements.xml");
        $announcements = $doc->getElementsByTagName('announcement');
		$last = $announcements->length -1;

		$titleVal = $announcements->item($last)->getElementsByTagName('title')->item( 0 )->nodeValue;
		$authorVal = $announcements->item($last)->getElementsByTagName('author')->item( 0 )->nodeValue;
		$messageVal = $announcements->item($last)->getElementsByTagName('message')->item( 0 )->nodeValue;
		$postdateVal = $announcements->item($last)->getElementsByTagName('postdate')->item( 0 )->nodeValue;
                          
    	echo '<h5>Latest Announcement: </h5><h4>'.$titleVal.' <span>('.$postdateVal.')</span></h4>';
    	echo '<p><a onclick="goToAnnouncements()" href="javascript:void(0);">read full post</a></p>';            
    ?>
    </div>
</div>

<div id="nav">
	<ul id="navList">
		<li><a id="findARide" href="home.php" title="Find A Ride">Find A Ride</a></li>
		<li><a id="postARide" href="home.php" title="Post A Ride">Post A Ride</a></li>
        <li><a id="goToRouteLib" href="routelibrary.php">Route Library</a></li>
        <li><a id="goToNewsletter" href="newsletter_archive.php">Newsletter</a></li>
        <li><a id="goToAnnouncements" href="announcements.php">Announcements</a></li>
		<li><a href="http://www.flickr.com/photos/paloalto-bicycleclub/">Photos</a></li>
                
	</ul>
</div>